home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Universal_2106383172008.psc / DLL Source / RetTest.cpp < prev    next >
C/C++ Source or Header  |  2008-02-13  |  798b  |  29 lines

  1. #include <windows.h>
  2.  
  3. extern "C" { int _fltused; }; 
  4.  
  5. extern "C" BOOL WINAPI _DllMainCRTStartup(HMODULE  hModule, DWORD dwReason, LPVOID  lpreserved)
  6. {
  7.    return TRUE;
  8. }
  9.  
  10. __int8  GetByte   () { return 0x12;                 }
  11. __int16 GetInteger() { return 0x1234;               }
  12. __int32 GetLong   () { return 0x12345678;           }
  13. __int64 GetInt64  () { return 1234567890123;        }
  14. void *  GetPointer() { return "Hello World";        }
  15. float   GetSingle () { return 1.234567890123456789; }
  16. double  GetDouble () { return 1.234567890123456789; }
  17.  
  18. double GetDblInc(double d) 
  19.    return d + 1.00;  
  20. }
  21.  
  22. void Subroutine(__int32 nValue)
  23. {
  24.    CHAR szText[80];
  25.  
  26.    wsprintfA(szText, "Parameter nValue: 0x%X", nValue);
  27.    MessageBoxA(0, szText,"Subroutine test", MB_OK);
  28. }